home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
telecomm
/
unitmacs.lzh
/
UNIMAC.TXT
< prev
Wrap
Text File
|
1990-02-19
|
17KB
|
339 lines
In addition to the sample macros you will find in recent Uniterm
documents in versions (2.0d and later), I have included here
three macros I have used for a long time to do auto-dialing on
BBS's. Before I removed phone numbers, system prompts and
responses, and login names and passwords, these macros and all
their features were known to work well and perform all the
claimed functions. Unfortunately, when this information is
removed, the macros will no longer work. Also, by their nature
each person's system, modem, desired features, etc. will be
different. Within the constraints of the maximum 4k file size of
these macros for Uniterm 2.0d and later, I have included all the
comments I could to explain what I was doing. I'm sorry if some
of these comments appear quite cryptic.
To use these macros, you must put them in a word processor that
will write them to an ASCII file with no control codes. Make
sure you name the files the same names you intend to use in the
Auto-dialer, Function Keys, or other macro you call them from.
When you see "loadsetup" near the beginning of each file, you are
to enter in the blank space following the name of the setup file
you want to use when this BBS is called. Inspect closely the
codes sent to the modem to control its features. Although my
modem is an Atari Hayes compatible, these will most likely have
to be changed or removed for your equipment and are included as
examples. When these macros are called, they must be in the
default directory that Uniterm is run from. You can use the
command: path('C:') in the auto-load macro or:
%path('C:') on a function key to change the default directory to
a "C" ramdisk (as I do) for example. If you do this, make sure
all other files such as setup files are there also or you will
have to switch directories back and forth at the proper times.
I will also apologize here for the convoluted code. I'm not a
programer although I enjoyed mastering this editor without much
help from the documentation and poor examples (parts of which
don't appear to work). You will see some labels out of order
and probable to expert eyes, some wasted code. I have added
features to these macros as they grew on me but didn't always
renumber lines. If nothing else, these should get you further
down the learning curve than the original documentation got me.
I played with these for 2 years before I got Uniterm's editor to
work properly for me.
The three files here:
BBSDIAL.MAC
This is a generic auto-login with re-dial that is prompted for
the user to enter the number of times re-dials will be attempted
after the first dial fails. This is the simplest of the three
files.
Listed here is a copy of the file as reference. I may include
additional comments in brackets "[ ]" here that are not permitted
in the macros that you can run. I have also filled some of the
blank entry lines with X's or examples that will not work if you
try to run the macros by removing them from this file.
>>>>>>>>>>>>>>>>>>>>>>>START EXAMPLE ONE>>>>>>>>>>>>>>>>>>>>>>>
# This is a general purpose BBS auto-dial. Edit modem codes, login, and setup
# files for your purposes. Remember...macro must not exceed 4k, speed of code
# transmission is determined by transfer rate in ASCII transfer menu.
# Control-C can abort between commands.
me('Loading Uniterm set up File') w(10)
loadsetup('uniterm.set') w(10) [THIS IS THE DEFAULT SETUP]
# Following are modem codes:
se('atz\r\n') w(10) se('ats7=17\r\n') w(10) se('atx4\r\n')
# This macro will redial w/prompt for retry number.
me('Dialing MY FAVORITE BBS. Will re-dial w/prompt for retries') w(10)
se('atdt9990000\r\n') w(05) set(1,1) set(2,0)
# Following is looking for first message from online to respond to.
if(!get('CONNECT',21)) ju(1) [IF YOUR MODEM DISPLAYS THIS
MESSAGE UPON CONFIRMING CONNECTION. IF NOT, YOU MAY WANT TO USE
THE FIRST SYSTEM PROMPT YOU GET]
:7
# Put log-on codes here. Put prompt text in "get", response in "send".
ge('HIT RETURN',10) w(05) se('\R\N')
ge('YOUR NAME',10) me('YOU MIGHT HAVE TO WAIT HERE') w(05)
se('MARY OR TOM') ge('Enter ID Number',15) w(20) se('9999999\r\n')
ge('Enter Your Password:',15) w(05) se('ZXZXZ\r\n')
#Start history and exit. [WHEN THE LAST LOGIN PROMPT IS
SATISFIED, THE SCREEN HISTORY IS TURNED ON AND THE MACRO ENDS
YOU CAN CONTINUE AT THIS POINT WITH YOU FIRST MENU SELECTIONS AND
AUTO DOWNLOADS OR MESSAGE BASE SCANS HERE. I ALWAYS DO THIS
MANUALLY BECAUSE I NEVER DO IT THE SAME]
history(1) me('History recording is ON') w(20) exit(0)
:1
# 1st fail and re-dial message. [THIS IN INVOKED WHEN "CONNECT"
FAILS]
ec('\r\n') ec('Failed!\r\n') w(05)
if(!input('Retries? Enter #1-?+Ret. or Cancel')) ec('Quit!\n') exit(0)
# Check to see if $T is "0". Yes=quit, No=go on.
if(com($T,'0')) ec('Quit. FINISHED!\r\n') exit(0)
# Use # in $T to set re-try counter.
set(1,.$T)
# place number in "Wait" command 3 seconds less than re-dial timeout.
me('Re-dial in 30 seconds.') w(270) [I DO THIS BECAUSE OF MY 3
SECOND ALT-C ABORT MESSAGE] (*)
:2
# Re-dial count, display, and check follows: @1= retry countdown @2=retry#
# "$T"=current retry display count.
# Display total remaining user re-tries on next line:
ec("@1) ec(' re-dial remains:\r\n') w(05)
set(1,add(@1,-1)) set(2,add(@2,1)) con('RETRY# ',"@2') ec($T) ec('\r\n')
me('Re-dialing MY FAVORITE BBS. Cntrl-C aborts. NOW!') w(30) (*)
me('Dialing...') send('atdt \r\n') [PUT THE SAME NUMBER
HERE AS ABOVE]
# Timeout for re-dial and success/fail. "ju(4)"=fail
if(!ge('CONNECT',21)) ec('\r\n') ju(4)
# If success, will return to log-in code near beginning.
ju(7)
:4
# Look for count in @1 for "0". If not, re-dial.
# If so, prompt for more retries.
if(com("@1','0')) ca(5)
# Failed and redial message for all until last prompt.
ec('Failed!\r\n') w(10) se('\n') me('Re-dial in 30 sec.') w(270) ju(2)
:5
# Prompt to try again or stop and end macro.
ec('Failed! More retries?\r\n') w(05) se('\n')
# User clicks "OK" will loop re-dial routine.
# Prompt for re-try #. "set" for variable int. @1 to # entered by user.
# If "cancel is clicked, message, and end.
if(input('Retries failed. Try again? Enter #-
RET.')) ju(6) [THIS IS WERE THE USE GETS TO TELL THE MACRO HOW
MANY TIMES TO RE-DIAL THE BBS OR CANCEL AND END THE MACRO]
ec('ALL RETRIES FAILED! FINISHED.\r\n') w(10) exit(0)
:6
# Check to see if $T is "0". Yes=quit, No=go on.
if(com($T,'0')) ec('Quit. FINISHED!\r\n') exit(0)
# Make "set" for variable "@1" user number.
w(05) set(1,.$T) ju(2)
[REMEMBER THIS MACRO WILL NOT RUN AS IS]
>>>>>>>>>>>>>>>>>>>>>>>END EXAMPLE ONE<<<<<<<<<<<<<<<<<<<<<<<<<
GENIEX.MAC
This is the macro I use to dial and log on to GEnie with Uniterm.
Less editing will be needed here as my prompts will be similar to
yours. Remember you can use function keys to call macros to do
the complicated message, file, and mail tasks on GEnie. I most
often use the function keys to send the one letter or word
commands I use most often. I have one function key that calls a
macro that displays a section of character faces for me to select
from to send at frivolous moments.
>>>>>>>>>>>>>>>>>>>>>>START EXAMPLE TWO<<<<<<<<<<<<<<<<<<<<<<<<<<
#This macro will load a customized GEnie set-up file and dial w/login.
#Be sure control codes sent to modem are correct for your equipment.
me('Setting modem echo to OFF,timeout to 17 sec.') w(20)
se('atz\r\n') w(10) se('ate0\r\n') w(10) se('ats7=17\r\n') w(10)
me('Loading GEnie set-up file') w(05) Loadsetup('genie.set')
#This macro will redial w/prompt for retry number.
me('Dialing GEnie BBS. Will re-dial w/prompt for retries') w(20)
#The following code contains the phone number and sets re-dial countdown:
se('atdt \r\n') w(05) set(1,1) set(2,0)
#Following looking for first message from online to respond to:
if(!get('CONNECT',20)) ca(1)
#Put log-on codes here.
W(10) se('h') w(05) se('h') w(05) se('h\